package tw.asap.plus.utils;

import android.util.Base64;

/**
 * Created by yamlee on 15/8/18.
 */
public class SecurityUtil {

    public static String encodeBase64(String sourceMsg){
        String strBase64 = new String(Base64.encode(sourceMsg.getBytes(), Base64.DEFAULT));
        return strBase64;
    }

    public static String decodeBase64(String encodedMsg) {
        String decodStr = new String(Base64.decode(encodedMsg.getBytes(), Base64.DEFAULT));
        return decodStr;
    }

}
